<?php
namespace app\validate;
use share\validate\SceneValidate;

class PrivacyValidate extends SceneValidate{

    /**
     * 通用规则
     */
    protected $rule = [
        'id' => 'require|integer',
        'edit_time' => 'require|integer',
        'language' => 'require|length:2,30',
        'package' => 'require|length:2,60',
        'version' => 'require|length:2,60',
    ];    

    // /**
    //  * 自定义场景的规则
    //  */
    // protected $sceneRules = [
    //     'set' =>[
    //         'id' => 'require|integer',
    //         'level' => 'integer',
    //         'account' => 'length:2,16',
    //         'password' => 'length:6,20',
    //         'vendor' => 'length:2,20',
    //     ],
    // ];

    protected $scene = [
        'list' => [],
        'set' => ['id','language','edit_time'],
        'lastTime' => ['language','package','version'],
        'del'  => ['id'],
    ];
}
